<script type="text/javascript">
    $(document).ready(function() {
<?php if ($SetPicksEnabled) { ?>
                $("#sortable_<?php echo $TabIndex; ?>").sortable({                                     
                    update : function () {
                        serial = $('#sortable_<?php echo $TabIndex; ?>').sortable('serialize');
                        serial += "\&Round=<?php echo $RoundNr; ?>";
                                                           
                        $.ajax({
                            url: "<?php echo URL; ?>picks/sortable",
                            type: "post",
                            data: serial,
                            error: function(){
                                alert("theres an error with AJAX");
                            }
                        });
                    }
                });
                                                    
<?php } ?>                                
            $( "#sortable_<?php echo $TabIndex ?>" ).disableSelection();
        });
</script>
